home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: esds01.es.dupont.com!news
- From: Malcolm Smart <MALCOLM.SMART@CONOCO.DUPONT.COM>
- Subject: Streams & Arrays (2nd attempt)
- Content-Type: text/plain; charset=us-ascii
- Message-ID: <1996Feb1.110824.7077@es.dupont.com>
- Sender: news@es.dupont.com (USENET News System)
- Nntp-Posting-Host: slai99.wrk.dupont.com
- Content-Transfer-Encoding: 7bit
- Organization: Conoco/DuPont
- Mime-Version: 1.0
- Date: Thu, 1 Feb 1996 11:08:24 GMT
- X-Mailer: Mozilla 1.1 (Windows; I; 16bit)
-
- Try again...
-
- Can anyone help with the following :-
-
- class TMyClass
- {
- public:
- TMyClass() {};
- private:
- char Name[255];
- }; //simple class
-
- typedef TArray<TMyClass> TMyClasses;
- typedef TArrayIterator<TMyClass> TMyClassIterator;
-
- The compile reports an error in <vectimp.h> when trying to compile the
- above. There's more code below, but that's irrelevant (I think).
-
- Can someone confirm that the above code is the correct way to define an
- arraytype of TMyClass and an iterator for that array.
-
- I would also like to iterate through an array of TMyClass and stream
- 'Name' to a file using <<. It is easy enough for someone out there to
- explain the easiest way to get << into my class, and how to apply that
- using an iterator.
-
- I'm not asking for much!!
-
- regards
-
- Malc.
-
- --The above is all mine and no one elses.
-
-
-
-